<!DOCTYPE html>
<html>
<head>
     {% include INC_PATH+"inc/script.html" %}
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content">
        <div class="row">
            <div class="col-sm-9 animated fadeInRight">
                <div class="mail-box-header">

                    <form method="get" action="" class="pull-right mail-search">
                        <div class="input-group">
                            <input type="text" class="form-control input-sm" name="key" placeholder="搜索留言标题，Email" value="{{key}}">
                            <div class="input-group-btn">
                                <button type="submit" class="btn btn-sm btn-primary">
                                    搜索
                                </button>
                            </div>
                        </div>
                    </form>
                    <h2>
                    收件箱 ({{totalGuest}})
                </h2>
                    <div class="mail-tools tooltip-demo m-t-md">
                        <div class="btn-group pull-right">
                           {{pageBar|safe}}
                        </div>
                        <button class="btn btn-white btn-sm" data-toggle="tooltip" data-placement="left" title="刷新留言列表" onclick="window.location.reload();">
                            <i class="fa fa-refresh"></i> 刷新
                        </button>
                    </div>
                </div>
                <div class="mail-box">

                    <table class="table table-hover table-mail">
                        <tbody>
                            <tr>
                                <td class="mail-ontact">
                                    ID
                                </td>
                                <td class="mail-ontact">标题
                                </td>
                                <td class="mail-subject">Email
                                </td>
                               
                                <td class="mail-date">留言时间</td>
                                 <td class="">操作
                                </td>
                            </tr>
                            {% for dataList in dataList %}
                            <tr {% if dataList.readed == 1 %} class="read" {% else %} class="unread" {% endif %} >
                                <td class="mail-ontact">
                                    {{dataList.id}}
                                    {% if dataList.readed == 1 %}
                                     <span class="label label-danger pull-right">Readed</span>
                                     {% endif%}
                                </td>
                                <td class="mail-ontact">

                                    <a href="/admin/guestbook/detail/id/{{dataList.id}}">{{dataList.title}}</a>
                                    
                                </td>
                                <td class="mail-subject"><a href="/admin/guestbook/detail/id/{{dataList.id}}">{{dataList.email}} 发布</a>
                                </td>
                                <td class="">{{dataList.create_time|timeformat}}</td>
                                <td class="">
                                    <a href="/admin/guestbook/detail/id/{{dataList.id}}" title="编辑"><span class="glyphicon glyphicon-cog" aria-hidden="true"></span></a>
                                </td>
                            </tr>
                           {% endfor %}
                        </tbody>
                    </table>


                </div>
            </div>
        </div>
    </div>


    <!-- 全局js -->
    {% include INC_PATH+"inc/commonJs.html" %}
    <!-- 自定义js -->
    <script src="{{ADMIN_PATH}}js/content.js?v=1.0.0"></script>
    <!-- iCheck -->
    <script src="{{ADMIN_PATH}}js/plugins/iCheck/icheck.min.js"></script>
    <script>
        $(document).ready(function () {
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
        });
    </script>

</body>

</html>
